package com.atguigu.pojo;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;


/**
 * projectName: com.atguigu.pojo
 *
 *  1. name 不为null和空串
 *     字符串：@NotNullBlank 集合：@NotEmpty 包装类：@NotNull
 *  2. password    长度大于等于10
 *  3. email 邮箱格式
 *
 */
public class User {
    //age   1 <=  age < = 150
    @Min(10)
    private int age;

    //name 3 <= name.length <= 6

    @NotBlank
    private String name;

    @Length(min = 10)
    private String password;

    //email 邮箱格式
    @Email
    private String email;

}
